package com.qijian.maindata.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qijian.common.annotation.Excel;
import com.qijian.maindata.domain.ProductionPlanDetail;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import java.util.List;
import java.util.Set;

import lombok.Data;

/***
 * 生产计划(按车间排产)
 */
@Data
public class ProductionPlanVo {

  @JsonSerialize(using= ToStringSerializer.class)
  @ApiModelProperty(value = "id")
  private Long id;

  @JsonFormat(pattern = "yyyy-MM-dd")
  @ApiModelProperty(value = "开始时间")
  private Date startTime;

  @Excel(name = "项目id")
  @JsonSerialize(using= ToStringSerializer.class)
  @ApiModelProperty(value = "项目id")
  private Long projectId;

  @Excel(name = "bomId")
  @JsonSerialize(using= ToStringSerializer.class)
  @ApiModelProperty(value = "bomId")
  private Long bomId;

  @Excel(name = "间隔天数")
  @ApiModelProperty(value = "间隔天数")
  private Long step;

  @ApiModelProperty("项目号")
  private String projectNo;

  @ApiModelProperty("机台号")
  private String machineNo;

  @ApiModelProperty("是否排产")
  private Boolean isDist;


  //新增3个开始时间 [工艺、采购、预算]
  @ApiModelProperty("工艺时间")
  @JsonFormat(pattern = "yyyy-MM-dd")
  private Date craftTime;

  @ApiModelProperty("采购时间")
  @JsonFormat(pattern = "yyyy-MM-dd")
  private Date purchaseTime;

  @ApiModelProperty("预算时间")
  @JsonFormat(pattern = "yyyy-MM-dd")
  private Date budgetTime;

  //节拍
  private Integer craftDays;

  private Integer purchaseDays;

  private Integer budgetDays;

  @ApiModelProperty("明细")
  private List<ProductionPlanDetail> items;

  @ApiModelProperty("历史版本号")
  private Set<Integer> historyVersions;

  @ApiModelProperty(value = "客户交期时间")
  @JsonFormat(pattern = "yyyy-MM-dd")
  private Date businessReleaseDate;

  @ApiModelProperty(value = "完工入库时间")
  @JsonFormat(pattern = "yyyy-MM-dd")
  private Date lastEndTime;

}
